package com.simplefan.system.common.Rest;

import com.simplefan.framework.common.rest.RestObjectAnalyzer;

public class StringRestObjectAnalyzer implements RestObjectAnalyzer<String>{

  public String toValue(String xmlFragment) {
    if (xmlFragment != null && !xmlFragment.equals("null")) {
      return xmlFragment;
    }
    else {
      return null;
    }
  }

  public String toXmlFragment(String value) {
    if (value == null) {
      return "null";
    }

    return value;
  }
}
